package com.gjzhao.fmmall.service.feign;

import com.gjzhao.fmmall.entity.Users;
import com.gjzhao.fmmall.service.feign.fallback.UserCheckClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description: 用户查询调用客户端
 * @Author: gjzhao
 * @Date Created in 2022-02-12 3:44 下午
 */
@FeignClient(value = "fmmall-user-check",fallback = UserCheckClientFallBack.class) //指定需要调用的服务名字
public interface UserCheckClient {

    /**
     * 查询用户
     *
     * @param username
     * @return
     */
    @GetMapping("user/check") //需要填写完整mapping
    Users checkUser(@RequestParam("username") String username);
}
